<template>
  <window class="m-progress-detail am-form-group" ref="win" title="已绑学员">
    <div class="am-form-group am-u-lg-12">
        <el-table
            :data="tableData"
            border
            stripe
            style="min-width: 100%">
            <el-table-column
            prop="studentName"
            label="学员"
            min-width="100">
            </el-table-column>
            <el-table-column
            prop="phoneNo"
            label="电话"
            min-width="100">
            </el-table-column>
      </el-table>
    </div>
  </window>
</template>

<script>
  import io from '../../lib/io'
  import {regLevels} from '../../lib/global'
  import moment from 'moment'

  export default{
    components: {},
    data: function () {
      return {
        userId:'',
        tableData: [],
      }
    },
    created () {
    },
    watch: {

    },
    computed: {
    },
    methods:{
      handleConfirm () {
        // this.$refs.form.validate((valid) => {
        //   if (valid) {
        //       coonsole.log(valid)
        //   } else {
        //     console.log('error submit!!')
        //     return false
        //   }
        // })
      },
        customerBindStudentList(){
            let param = {
              userId:this.userId
            }
            io.post(io.customerBindStudentList,param,(ret)=>{
                if(ret.success){
                    this.tableData = ret.data
                }else{
                    this.$alert(ret.desc)
                }
          })
      },
      handleCancel () {
        this.$refs.win.close()
      },
      show:function(){
        this.customerBindStudentList()
        this.$refs.win.show( { width : 800 } )
        
      }
    }
  }

</script>
<style lang="less" scoped>
  .m-progress-detail {
    .el-form {
      width: 550px;
      margin: 0 auto;
      text-align: left;
      margin-top: 30px;
      .el-select, .el-date-editor.el-input {
        width: 250px;
      }
    }
  }
</style>
